package com.fafu.ioc.component;

import com.fafu.ioc.modal.UserInfo;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class UserComponent {
//    @Qualifier("userInfo2")
//    @Autowired
    @Resource(name = "userInfo")
    private UserInfo us;
    public void say(){
        System.out.println("UserComponent say.....");
        System.out.println(us);
    }
}
